class AddItemNotNullConstraints < ActiveRecord::Migration
  def self.up
    change_column :items, :location_row, :integer, :null => false
    change_column :items, :location_column, :integer, :null => false
    change_column :items, :foreground_color, :string, :null => false
    change_column :items, :background_color, :string, :null => false
    change_column :items, :order, :integer, :null => false, :default => 1
  end

  def self.down
    change_column :items, :location_row, :integer
    change_column :items, :location_column, :integer
    change_column :items, :foreground_color, :string
    change_column :items, :background_color, :string
    change_column :items, :order, :integer
  end
end
